home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950528-19950726 / 000082_news@columbia.edu_Wed Jun 7 03:29:27 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA20986
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Wed, 7 Jun 1995 22:29:40 -0400
  3. Received: by apakabar.cc.columbia.edu id AA06323
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Wed, 7 Jun 1995 22:29:38 -0400
  5. Newsgroups: comp.protocols.kermit.misc
  6. Path: news.columbia.edu!panix!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!news.sprintlink.net!noc.netcom.net!netcom.com!mkercher
  7. From: mkercher@netcom.com (Matthew Kercher)
  8. Subject: Re: Kermit as data-entry clerk
  9. Message-Id: <mkercherD9s9p4.63J@netcom.com>
  10. Keywords: kermit variables
  11. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  12. References: <3r2avh$cdm@cmhcsys.cmhcsys.com>
  13. Date: Wed, 7 Jun 1995 03:29:27 GMT
  14. Lines: 36
  15. Sender: mkercher@netcom16.netcom.com
  16. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  17.  
  18. chuck@cmhcsys.com (Chuck Stickelman) writes:
  19.  
  20. >I proposed that we output the data to a DOS file in a format Kermit
  21. >would like: {field data    }{more field data   }{even more...} etc.
  22. >    define parse assign \%a \%1, assign \%b \%2, assign \%c \%3, ...
  23. >    open somefile.dat
  24. >    read \%z
  25. >    parse \%z
  26. >    output \%a
  27. >    output \%b
  28. >    output \%c
  29. >However, the records in somefile.dat have too many fields (>35 in one
  30. >instance) and I'm running out of both temporary and permanent variables.
  31. >Charles A. Stickelman            <chuck@cmhcsys.com>
  32.  
  33. I have a bunch of macros that I'll mail to you (too big to post here) which
  34. take a line of text and parse it into named variables ($1 - $9).  I'll also
  35. send you some shift-left and shift-right macros which make manipulating
  36. these variables easy.  The problems that I've worked around are:
  37.  
  38.  . MSK's \%1 - \%9 variables work great for most things, but the command
  39.    parser doesn't like to expand them at the end of definitions or
  40.    assignments (e.g., _assign $\m(x) works great, but _assign $\%1 doesn't
  41.    work for some reason having to do with the way the line is parsed).
  42.  
  43.  . You only have 9 command line variables and no way to shift them down
  44.    easily.  Read puts the entire line (record) into the variable \%z, but
  45.    getting at the fields past 9 has proven difficult (but solvable by
  46.    parsing, shifting, etc.)
  47.  
  48. -Matt (mkercher@netcom.com) 
  49. -- 
  50. /-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-\
  51. | Matt Kercher                         kercher@netcom.com |
  52. + Naval Aviation Depot (0413)              (510) 263-6502 +
  53. | Alameda, CA 94501-5008                                  |
  54. + Standard disclaimer-these thoughts are mine, thank you. +
  55. \-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-/